2017-10-13 apache 设置图片等静态文件的过期时间 ApacheLAMP httpd.conf 中加入 12345678ExpiresActive onExpiresByType image/gif "access plus 1 days"ExpiresByType image/jpeg "access plus 24 hours"ExpiresByType image/png "access plus 24 hours"ExpiresByType text/css "now plus 2 hour"ExpiresByType application/x-javascript "now plus 2 hours"ExpiresByType application/x-shockwave-flash "now plus 2 hours"ExpiresDefault "now plus 0 min" 注释: Expires 语法如下: 1ExpiresByType type/encoding "<base> [plus] {<num> <type>}*" 其中是下列之一: access now (等价于’access’) modification plus关键字是可选的。必须是整数[可以被atoi()接受的],是下列之一: years months weeks days hours minutes seconds 参考: http://apache.chinahtml.com/mod/mod_expires.html < apache 限制某些目录不能访问通过rewrite实现 Apache模块动态加载和静态加载 >